/* =================================
   表格组件样式
   ================================= */

/* 页面容器 */
.page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: var(--space-xl);
}

/* 页面标题区域 */
.page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    color: white;
}

.page-title {
    font-size: var(--font-3xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--primary-green);
}

.page-title i {
    font-size: 3rem;
    color: var(--accent-cyan);
}

.page-subtitle {
    font-size: var(--font-xl);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* 表格区域 */
.table-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 12px;
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-xl);
}

/* 区域标题 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: var(--font-2xl);
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title i {
    color: var(--primary-green);
    font-size: var(--font-xl);
}

.section-actions {
    display: flex;
    gap: var(--space-md);
}

/* 表格容器 */
.table-container {
    background: rgba(29, 43, 64, 0.4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(33, 150, 243, 0.2);
    box-shadow: var(--shadow-lg);
}

.table-container.compact {
    background: rgba(29, 43, 64, 0.6);
}

/* 基础表格样式 */
.data-table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-base);
    color: white;
}

/* 表头样式 */
.data-table thead th,
.stats-table thead th {
    background: rgba(29, 43, 64, 0.8);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--primary-green);
    font-size: var(--font-base);
    letter-spacing: 0.5px;
    position: relative;
}

.data-table thead th:first-child,
.stats-table thead th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.data-table thead th:last-child,
.stats-table thead th:last-child {
    border-top-right-radius: var(--radius-lg);
}

/* 表格行样式 */
.data-table tbody tr,
.stats-table tbody tr {
    transition: all var(--duration-normal) ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover,
.stats-table tbody tr:hover {
    background: rgba(76, 175, 80, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.data-table tbody tr:last-child,
.stats-table tbody tr:last-child {
    border-bottom: none;
}

/* 表格单元格样式 */
.data-table td,
.stats-table td {
    padding: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-base);
    vertical-align: middle;
}

/* 数字单元格 */
.number-cell {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--accent-cyan) !important;
}

.number-cell.highlight {
    color: var(--primary-green) !important;
    font-size: var(--font-xl);
    font-weight: 700;
}

.number-cell.success {
    color: var(--text-success) !important;
}

.number-cell.error {
    color: var(--text-error) !important;
}

/* 时间单元格 */
.time-cell {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.7);
}

.time-period {
    font-weight: 600;
    color: var(--accent-orange) !important;
    font-family: 'Courier New', monospace;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
    text-align: center;
}

.status-badge.status-normal {
    background: rgba(76, 175, 80, 0.2);
    color: var(--primary-green);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-badge.status-success {
    background: rgba(0, 230, 118, 0.2);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-badge.status-warning {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-badge.status-error {
    background: rgba(244, 67, 54, 0.2);
    color: #ff1744;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* 操作按钮 */
.action-cell {
    text-align: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    margin: 0 var(--space-xs);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn.view:hover {
    background: rgba(33, 150, 243, 0.2);
    color: var(--accent-blue);
}

.action-btn.edit:hover {
    background: rgba(76, 175, 80, 0.2);
    color: var(--primary-green);
}

/* 进度条单元格 */
.progress-cell {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-cyan));
    border-radius: var(--radius-sm);
    transition: width var(--duration-normal) ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-weight: 600;
    color: var(--primary-green);
    min-width: 40px;
    text-align: right;
}

/* 分页器 */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-base);
}

.pagination-controls {
    display: flex;
    gap: var(--space-sm);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    font-size: var(--font-base);
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(76, 175, 80, 0.2);
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 动画效果 */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 表格进入动画 */
.table-section {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 行悬停发光效果 */
.data-table tbody tr:hover td,
.stats-table tbody tr:hover td {
    box-shadow: inset 0 0 0 1px rgba(76, 175, 80, 0.2);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .table-container {
        overflow-x: auto;
    }
    
    .data-table,
    .stats-table {
        min-width: 800px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: var(--space-lg);
    }
    
    .section-header {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: flex-start;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 数据高亮效果 */
.data-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.stats-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}
